package com.hotpot.common.base.vm;

import java.io.Serializable;

/**
 * 描述:分页实体
 * @author: myx
 * @date: 2017/11/20 0020
 * 注意：本内容仅限于新疆感知科技有限公司内部传阅,禁止外泄以及用于其他的商业目
 * Copyright © 2017-ganinfo. All rights reserved.
 */
public class SmartPagination implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 开始数(limit后的数字)
     */
    private Integer start;

    /**
     * 每页条数
     */
    private Integer number;

    /**
     *总页数
     */
    private Integer numberOfPages;

    /**
     * 总数
     */
    private Integer totalItemCount;

    public Integer getTotalItemCount() {
        return totalItemCount;
    }

    public void setTotalItemCount(Integer totalItemCount) {
        this.totalItemCount = totalItemCount;
    }

    public Integer getStart() {
        if (start>0){
            start = start/number +1;
        }
        return start;
    }

    public void setStart(Integer start) {
        this.start = start;
    }

    public Integer getNumber() {
        return number;
    }

    public void setNumber(Integer number) {
        this.number = number;
    }

    public Integer getNumberOfPages() {
        return numberOfPages;
    }

    public void setNumberOfPages(Integer numberOfPages) {
        this.numberOfPages = numberOfPages;
    }
}
